<?php
/**
 * Created by clz.
 * User: clz
 * Date: 2018/7/12
 * Time: 22:53
 */
//date_default_timezone_set('Asia/Shanghai');
//namespace root;
//sleep(10);
//$date = date('Y-m-d H:i:s');
$redis = new \Redis();
$redis->connect('127.0.0.1', '6379');
$redis->auth('123456');
//$redis->set($date.'yibu','1234');
//echo '<pre>';
//print_r($_SERVER);
//phpinfo();
//$arr1 = [5.9 =>'qwer','05'=>'dasd',2=>3];unset($arr1[2]);
//$arr2 = ['01'=>'qwer1',2=>'dasd1'];
//print_r((object)$arr1);
//print_r($arr1);
//
//echo '<pre>';
//var_export(array_merge($arr1,$arr2));
//include 'include.php';$var1 = $include;
//
//文件包含

//变量/常量/类声明
 class  test{
    const qwer = ['ss'];
    public  $test1;
    public  static  $test2;

    public static function index1(){
        echo 'chhiji-test11';
    }
    public  function index2(){
        self::$test2 = 'qweqw';
        echo 'chhiji-test22';
    }
}
//}
//
class child extends test
{
    public  $test;
    public function __construct()
    {
        $this->test = 'test';
    }

    public  function index($ee){
        echo 'chhiji-Child';
    }
}
//$ob = new test();
//$obc = new child();
//class A {
//    private function foo() {
//        echo "success!\n";
//    }
//    public function test() {
//        $this->foo();
//        static::foo();
//    }
//}
//
//class B extends A {
//    /* foo() will be copied to B, hence its scope will still be A and
//     * the call be successful */
//}
//
//class C extends A {
//    private function foo() {
//        /* original method is replaced; the scope of the new one is C */
//        echo "successqqqqqqqq!\n";
//    }
//}
//
//$b = new B();
//$b->test();
//$c = new C();
//$c->test();
//$obi = new index();
$var = new child();
//$ss = getimagesize($var);
//$date = date('Y-m-d H:i:s');
//
//error_log($date."\r\n",3,"./log.log");
//逻辑
//$return = $var;
//header('Access-Control-Allow-Origin: *');
//header('Content-Type:application/json; charset=utf-8');
//exit(json_encode($return,TRUE));
//var_export($var);
echo '<pre>';
var_export($var);

//$var = 'asdad';
